package com.rd.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.rd.common.vo.UpdateAvatarFormData;
import com.rd.pojo.Admin;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author qiufenfen
 * @since 2023-10-26
 */
public interface AdminMapper extends BaseMapper<Admin> {

    /**根据关键字获取账户信息*/
    List<Admin> getAllAdmins(Integer id, String keywords);

    /**根据id修改用户状态*/
    Integer updateStatusById(@Param("id") String id,@Param("enabled") Boolean enabled);

    /*个人中心*/
    Integer updateAdminInfo(Admin admin);

    String checkOldPwd(@Param("userId") Integer userId);

    Integer updateAvatar(UpdateAvatarFormData imgForm);

    int updatePwd(Admin admin);
}
